package cz.muni.fi.hauntedhouses.to;

import cz.muni.fi.hauntedhouses.enums.Fear;
import cz.muni.fi.hauntedhouses.enums.Gender;

/**
 *
 * @author Martin Vala, 359917
 */
public class HumanTO {
    
    private Long id;   
    private String name;
    private Gender gender;
    private float scareMeter = 0;
    private float resistance;
    private Fear worstFear;
    private HouseTO house;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Gender getGender() {
        return gender;
    }

    public void setGender(Gender gender) {
        this.gender = gender;
    }

    public float getScareMeter() {
        return scareMeter;
    }

    public void setScareMeter(float scareMeter) {
        this.scareMeter = scareMeter;
    }

    public float getResistance() {
        return resistance;
    }

    public void setResistance(float resistance) {
        this.resistance = resistance;
    }

    public Fear getWorstFear() {
        return worstFear;
    }

    public void setWorstFear(Fear worstFear) {
        this.worstFear = worstFear;
    }

    public HouseTO getHouse() {
        return house;
    }

    public void setHouse(HouseTO house) {
        this.house = house;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 53 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 53 * hash + (this.name != null ? this.name.hashCode() : 0);
        hash = 53 * hash + (this.gender != null ? this.gender.hashCode() : 0);
        hash = 53 * hash + (this.worstFear != null ? this.worstFear.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final HumanTO other = (HumanTO) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        if (this.gender != other.gender) {
            return false;
        }
        if (this.worstFear != other.worstFear) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "HumanTO{" + "id=" + id + ", name=" + name + ", gender=" + gender + ", scareMeter=" + scareMeter + ", resistance=" + resistance + ", worstFear=" + worstFear + ", house=" + house + '}';
    }
}
